<template>
  <div>
    <ul>
      <li v-for="(item,index) in data" :key="index">
        <div class="tu">
          <img :src="item.img" alt="" />
        </div>
        <div class="text">
          <h2>{{item.id}}</h2>
        </div>
        <div class="textt">{{item.text}}</div>

        <div class="datay">
          <p>{{item.data}}</p>
          <p>东西</p>
        </div>

        <div class="dibu">
          <p>{{item.prop}}</p>
          <p>{{item.difang}}</p>
        </div>
      </li>
    </ul>
  </div>
</template>
<script>
import instance from "../request/api";
export default {
  name: "produca",
  data() {
    return {
      data:[]
    };
  },
  components: {
  },
  created() {
    this.fn_data();
  },
  methods: {
    async fn_data() {
      let { data } = await instance.get(
        " https://mock.presstime.cn/mock/61bd3bbb90bfb20016179223/wen/zi"
      );
      this.data = data.datas.lis;
      console.log(this.data);
    },
  },
};
</script>
<style scoped lang="less">
ul {
  width: 100%;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}
li {
  list-style: none;
  width: 260px;
  height: 450px;
  border: 1px solid #000;
  font-size: 10px;
  margin-top: 30px;
}
.tu {
  width: 100%;
  height: 270px;
}
.tu img {
  width: 100%;
  height: 100%;
}
.text {
  height: 30px;
  margin-left: 10px;
  margin-top: 10px;
}
.textt {
  width: 100%;
  height: 80px;
  margin-left: 10px;
  overflow: hidden;
}
.datay {
  height: 30px;
  display: flex;
  justify-content: space-between;
  margin-left: 10px;
  margin-right: 10px;
}
.dibu {
  display: flex;
  margin-left: 10px;
  height: 30px;
}
</style>